<?php


namespace App\Http\Controllers\admin\api;


use App\Http\Controllers\admin\service\PADService;
use App\Http\Controllers\admin\validate\PAD;
use App\Http\Controllers\utils\ToolUtil;
use Illuminate\Http\Request;

class PADApi
{
    public function queryTeacherLocking(Request $request){
        $param = $request->all();
        $data = PAD::queryTeacherLocking($param);
        if($data){
            return ToolUtil::returnJson(401,$data[0]);
        }
        return PADService::queryTeacherLocking($param);
    }

    public function importTeacherLocking(Request $request){
        $param = $request->all();
        $data = PAD::importTeacherLocking($param);
        if($data){
            return ToolUtil::returnJson(401,$data[0]);
        }
        return PADService::importTeacherLocking($param);
    }

    public function queryParentLocking(Request $request){
        $param = $request->all();
        $data = PAD::queryParentLocking($param);
        if($data){
            return ToolUtil::returnJson(401,$data[0]);
        }
        return PADService::queryParentLocking($param);
    }

    public function importParentLocking(Request $request){
        $param = $request->all();
        $data = PAD::importParentLocking($param);
        if($data){
            return ToolUtil::returnJson(401,$data[0]);
        }
        return PADService::importParentLocking($param);
    }

    public function importTeacherReset(Request $request){
        $param = $request->all();
        $data = PAD::importTeacherReset($param);
        if($data){
            return ToolUtil::returnJson(401,$data[0]);
        }
        return PADService::importTeacherReset($param);
    }

    public function queryTeacherReset(Request $request){
        $param = $request->all();
        $data = PAD::queryTeacherReset($param);
        if($data){
            return ToolUtil::returnJson(401,$data[0]);
        }
        return PADService::queryTeacherReset($param);
    }

    public function importParentReset(Request $request){
        $param = $request->all();
        $data = PAD::importParentReset($param);
        if($data){
            return ToolUtil::returnJson(401,$data[0]);
        }
        return PADService::importParentReset($param);
    }

    public function queryParentReset(Request $request){
        $param = $request->all();
        $data = PAD::queryParentReset($param);
        if($data){
            return ToolUtil::returnJson(401,$data[0]);
        }
        return PADService::queryParentReset($param);
    }

    public function adminRelieveBindSn(Request $request){
        $param = $request->all();
        $data = PAD::adminRelieveBindSn($param);
        if($data){
            return ToolUtil::returnJson(401,$data[0]);
        }
        return PADService::adminRelieveBindSn($param);
    }

    
}